﻿using System;

namespace CheatMenu.Utils
{
    public class Command
    {
        public string Name { get; set; }
        public Action<Command> Action { get; set; }
        public bool ToggleState { get; set; }

        public Command(string name, Action<Command> action, bool toggleState = false)
        {
            Name = name;
            Action = action;
            ToggleState = toggleState;
        }
        
        public void InvokeCommand()
        {
            Action?.Invoke(this);
        }
    }
}
